import { NavBar } from 'antd-mobile';
import { history, Link, useDispatch } from 'umi';
import styles from './index.less';

interface NavBarProps {
  title: string;
  subTitle?: string;
}

export default function (props: NavBarProps) {
  const dispatch = useDispatch();
  const { title, subTitle } = props;
  return <NavBar onBack={() => history.goBack()}>{title}</NavBar>;
}
